<div class="row">
	<input type="hidden" name="branch.id" value="${(branch.id)!}" />
	<input type="hidden" name="branchid" value="${(branchid)!}" />
	
	<div class="form-group">
		<label class="col-xs-2 control-label">账号</label>
		<div class="col-xs-4">
			<input type="text" class="form-control" name="user.username" value="${(user.username)!}" placeholder="登陆账号" autofocus  required autocomplete="off"/>
		</div>
		<div class="col-xs-4">
		[#if usernameMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(usernameMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-2 control-label">姓名</label>
		<div class="col-xs-2">
			<input type="text" class="form-control" name="user.first_name" value="${(user.first_name)!}" placeholder="姓"   required autocomplete="off"/>
		</div>
		
		<div class="col-xs-2">
			<input type="text" class="form-control" name="user.last_name" value="${(user.last_name)!}" placeholder="名"   required autocomplete="off"/>
		</div>
		<div class="col-xs-4">
		[#if fullnameMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(fullnameMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-2 control-label">性别</label>
		<div class="col-xs-4">
				<select id="selectGender" name="selectGender" class="form-control"  required >
					<option value="" selected="selected">请选择</option>
					<option value="0" >男</option>
					<option value="1" >女	</option>
				</select>
		</div>
		<div class="col-xs-4">
		[#if genderMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(genderMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-2 control-label">联系方式</label>
		<div class="col-xs-4">
			<input type="text" class="form-control" name="user.phone" value="${(user.phone)!}" placeholder="联系方式"   required autocomplete="off"/>
		</div>
		<div class="col-xs-4">
		[#if phoneMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(phoneMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-2 control-label">邮箱地址</label>
		<div class="col-xs-4">
			<input type="text" class="form-control" name="user.email" value="${(user.email)!}" placeholder="邮箱地址"   required autocomplete="off"/>
		</div>
		<div class="col-xs-4">
		[#if emailMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(emailMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	[@shiro.hasRole name="R_ADMIN"]
	<div class="form-group">
		<label class="col-xs-2 control-label">单位</label>
		<div class="col-xs-4">
				<select id="selectBranch" name="selectBranch" class="form-control"  required>
					<option value="" selected="selected">请选择</option>
					[#list branchList as branch]
					<option value="${(branch.id)!}" >${(branch.name)!}	</option>
					[/#list]
				</select>
		</div>
		<div class="col-xs-4">
		[#if brandhMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(branchMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	[/@shiro.hasRole]
	[@shiro.hasRole name="R_MANAGER"]
	<div class="form-group">
		<label class="col-xs-2 control-label">单位</label>
		<div class="col-xs-4">
				<select id="selectBranch" name="selectBranch" class="form-control"  required disabled>
					<option value="" selected="selected">请选择</option>
					[#list branchList as branch]
					[#if (branchid?number)=branch.id]
					<option value="${(branch.id)!}"  selected="selected">${(branch.name)!}	</option>
					[#else]
					<option value="${(branch.id)!}"  >${(branch.name)!}	</option>
					[/#if]
					[/#list]
				</select>
		</div>
	</div>
	[/@shiro.hasRole]

	<div class="form-group">
		<label class="col-xs-2 control-label">部门</label>
		<div class="col-sm-2">
			<select id="selectFapartment" name="selectFapartment" class="form-control" required >
			</select>
		</div>
		<div class="col-sm-2">
			<select id="selectApartment" name="selectApartment" class="form-control" required>
			</select>
		</div>
		<div class="col-xs-4">
		[#if apartmentMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(apartmentMsg)!}
			</div>
		[/#if]
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-2 control-label">职位</label>
		<div class="col-xs-4">
				<select id="selectPosition" name="selectPosition" class="form-control"  required>
				</select>
		</div>
		<div class="col-xs-4">
		[#if positionMsg??]
			<div class="index-alert index-alert-danger" style="background-image:none;">
			${(positionMsg)!}
			</div>
		[/#if]
		</div>
	</div>

	<div class="form-group">
		<div class="col-xs-offset-2 col-sx-10">
			<button id="submit" value="提交" type="submit" class="btn btn-primary save" data-loading-text="正在提交...">提交</button>
		</div>
	</div>
</div>